package com.example.java_chatroom.model;

import com.example.java_chatroom.utils.DateUtils;
import lombok.Data;

import java.util.Date;

@Data
public class Message {
    private int messageId;
    private int fromId; //发送者的用户id
    private String fromName;
    private int sessionId;
    private String content;
    private Date postTime;


    public String getPostTime() {
        return DateUtils.dateFormat(postTime);
    }
}
